<?php
header('Content-Type: application/octet-stream');
header('Content-Length: '. 100000);
header('Content-disposition: attachment; filename='. $filename.".xml");
header('Pragma: no-cache');
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
readfile("$fileFolder");
exit();
?>

<?php if($success):?>
<?php slot("successMessages")?>
Successful export !
<?php end_slot();?>
<a href="<?php echo $link?>"><?php echo $filename.".xml"?></a>
<?php else:?>
<?php slot("errorMessages")?>
Failure export : Filename needed!
<?php end_slot();?>
<a href="<?php echo url_for("exportToLuna/index")?>">Export project</a>
<?php endif;?>